7a192a8d5f643e51837ad2ce4cba91a29c343e9d,src/com/vaadin/terminal/gwt/client/ui/VTextualDate.java,VTextualDate,buildDate,#,174

Before Change


        String dateText;
        Date currentDate = getDate();
        if (currentDate != null) {
            String formatStr = getFormatString();

            /*
             * Check if format contains the month name. If it does we need to
             * manually convert it to the month name since DateTimeFormat.format
             * always uses the current locale and will replace the month name
             * wrong if current locale is different from the locale set for the
             * DateField.
             * 
             * MMMM is converted into long month name, MMM is converted into
             * short month name. '' are added around the name to avoid that
             * DateTimeFormat parses the month name as a pattern.
             */
            if (formatStr.contains("MMMM")) {
                @SuppressWarnings("deprecation")
                String monthName = getDateTimeService().getMonth(
                        currentDate.getMonth());

                if (monthName != null) {
                    formatStr = formatStr.replaceAll("[M]{4,}", "'" + monthName
                            + "'");
                }
            }

            if (formatStr.contains("MMM")) {

                @SuppressWarnings("deprecation")
                String monthName = getDateTimeService().getShortMonth(
                        currentDate.getMonth());

                if (monthName != null) {
                    formatStr = formatStr.replaceAll("[M]{3,}", "'" + monthName
                            + "'");
                }
            }

            DateTimeFormat format = DateTimeFormat.getFormat(formatStr);
            dateText = format.format(currentDate);
        } else {
            dateText = "";
        }

After Change


        Date currentDate = getDate();
        if (currentDate != null) {
            dateText = getDateTimeService().formatDate(currentDate,
                    getFormatString());
        } else {
            dateText = "";
        }